Skip to content

Qualcomm AI Engine Direct - Support LPAI Backend#18151

Open
shewu-quic wants to merge 2 commits intopytorch:mainfrom
CodeLinaro:dev1/hutton/support_LPAI_backend
Open

Qualcomm AI Engine Direct - Support LPAI Backend#18151
shewu-quic wants to merge 2 commits intopytorch:mainfrom
CodeLinaro:dev1/hutton/support_LPAI_backend

Conversation

@shewu-quic
Copy link
Collaborator

@shewu-quic shewu-quic commented Mar 13, 2026

Summary:

  • Add LPAI infra
    • Because of the accuracy issue with quantize and dequantize operations in LPAI, Q and DQ will fallback to CPU for the LPAI backend. Therefore, it only support fully delegate for now
    • Support runtime option for fps, ftrt_ratio, clent_perf_type, affinity, and core_selection. Refer to QNN doc to get more details for these options.
  • Support LPAI in test_qnn_delegate.py
  • Refactor documentation for LPAI and GPU
  • Add a script to sign the skel library
    • Note that the skel library must be signed and must run with root on the device for LPAI.

Test Plan

python3 backends/qualcomm/tests/test_qnn_delegate.py TestQNNQuantizedOperator.test_qnn_backend_mean  -b build-android  -H ${host} -s ${serial_num} -m SM8850 -r /path/to/executorch -a /path/to/artifacts --backend lpai

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 13, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18151

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 2 Unrelated Failures

As of commit c7e6b61 with merge base ba54389 (image):

NEW FAILURE - The following job has failed:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 13, 2026
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@shewu-quic shewu-quic force-pushed the dev1/hutton/support_LPAI_backend branch from ff3c249 to 550ec45 Compare March 13, 2026 05:59
Summary:

- Add LPAI infra
  - Because of the accuracy isue with quantize and dequantize
    operations in LPAI, Q and DQ will fallback to CPU for the LPAI
backend.
  - Support runtime option for `fps`, `ftrt_ratio`, `clent_perf_type`,
    `affinity`, and `core_selection`. Refer to [QNN
doc](https://docs.qualcomm.com/doc/80-63442-10/topic/lpai_backend.html#full-json-scheme)
to get more details for these options.
- Support LPAI in `test_qnn_delegate.py`
- Refactor documentation for LPAI and GPU
- Add a script to sign the skel library
@shewu-quic shewu-quic force-pushed the dev1/hutton/support_LPAI_backend branch from eaf3e9b to c7e6b61 Compare March 18, 2026 06:57
@shewu-quic
Copy link
Collaborator Author

Hi @cccclai, @abhinaykukkadapu,

This PR is to support LAPI Backend on x86 and arm (with RPC mode). After LPAI backend is supported, it should be easy to extend non-RPC support for aDSP.
Could you please help to take a look?

Thanks,
Hutton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant